#include "CubeTexture.h"
#include "Core\Core.h"
#include "RenderManager.h"


CCubeTexture::CCubeTexture()
: m_Texture(NULL) 
{}

CCubeTexture::~CCubeTexture() {}


bool CCubeTexture::LoadFile()
{
	return !FAILED( D3DXCreateCubeTextureFromFile(CORE->GetRenderManager()->GetDevice(), m_FileName.c_str(), &m_Texture) );
}

void CCubeTexture::Activate(size_t StageId)
{
	CORE->GetRenderManager()->GetDevice()->SetTexture(StageId, m_Texture);
}

void CCubeTexture::Unload()
{
	CHECKED_RELEASE(m_Texture);
}


